home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / CERFNET.MPS < prev    next >
Text File  |  1995-10-09  |  1KB  |  67 lines

  1. # Quarterdeck CERFnet login script
  2.  
  3. STRING username
  4. STRING password
  5. STRING ipframing
  6. STRING ipaddr
  7.  
  8. SetTimeOut 90
  9. CfgGetValue "Username" username
  10.  
  11. IF result = 0 THEN
  12.     GetInput "Enter your username:" username
  13.     IF result = 0 THEN
  14.         ABORT "Error. No username entered."
  15.     ENDIF
  16. ENDIF
  17.  
  18. CfgGetValue "Password" password
  19.  
  20. IF result=0 THEN
  21.     GetPassword "Enter your password:" password
  22.     IF result = 0 THEN
  23.         ABORT "Error. No password entered."
  24.     ENDIF
  25. ENDIF
  26.  
  27. CfgGetValue "Framing" ipframing
  28.  
  29. IF result=0 THEN
  30.     ABORT "Can't read 'Framing' setting from qdeck.ini"
  31. ENDIF
  32.  
  33. CommWaitFor "Username: "
  34.     CommSend username
  35.     CommSend "%r"
  36.  
  37. CommWaitFor "Password: "
  38.     CommSend password
  39.     CommSend "%r"
  40.  
  41. # this is our terminal server prompt
  42. CommWaitFor ">"
  43.  
  44. IF ipframing="MPSLIP" THEN
  45. # cisco TS should auto-detect compressed SLIP packets
  46.     CommSend "slip default%r"
  47. ELSE
  48. # PPP is not supported at all of our POP sites, so this may fail...
  49.     IF ipframing="MPPPP" THEN
  50.         CommSend "ppp default%r"
  51.     ELSE
  52.         ABORT "Error. CERFnet does not support framing option:",ipframing,".%r"
  53.     ENDIF
  54. ENDIF
  55.  
  56. CommWaitFor "Your IP address is "
  57.     CommReadIPAddr ipaddr
  58.  
  59. IF result>0 THEN
  60.     CfgSetValue "IPAddress" ipaddr
  61.     PRINT "%rIP address set to ["; ipaddr; "]"
  62. ELSE
  63.     ABORT "Error. Can't read IP address."
  64. ENDIF
  65.  
  66. END
  67.